<?php defined( 'BASEPATH' ) or die( 'Restricted' );
/*
-----------------------------------------------------------------------------
| This file is copyright 2011 by TMLA INC  ALL RIGHTS RESERVED.
|----------------------------------------------------------------------------
| View for url /l/_/ink
|----------------------------------------------------------------------------
| Date			| Person		| Change Description
|----------------------------------------------------------------------------
| 2011-07-04	| TGallagher	| Created
-----------------------------------------------------------------------------
*/

if ( GET()->exists( 'm' ) )
{
	load_config( 'messages' );
	$messages = config( 'messages' );
	?><div class="msgbox"><span></span><?= $messages[GET()->m]; ?></div><?
}
?>
<div id="ajax-msg" class="msgbox"></div>
<ul class="home-list">
<li link_id="<?= $row->link_id; ?>" class="link <?= alternate( 'e', 'o' ); ?>">
	<a href="<?= $row->link_url; ?>"><?= $row->link_page_title; ?></a>
	<ul class="link-meta">
		<li><?= nl2br( $row->link_desc ); ?></li>
		<li><a href="<?= $row->link_url; ?>"><?= $row->link_url; ?></a></li>
		<li>added/updated: <?= $row->link_ts; ?></li>
		<li>popularity: <?= $row->link_add_count?> / <a class="spamlink" link_id="<?= $row->link_id; ?>" href="#">flag spam</a> : <span class="spam_count"><?= $row->link_spam_report_count; ?></span>
		<div class="clearspacer"></div>
		</li>
	</ul>
</li>
<li class="e">
	<h2>Tags:</h2>
	<?
	$tag = $linkTagModel->fetchForLink( $row->link_id );
	$tags = array();
	$tagCnt = 0;
	while ( $tag->fetch() )
	{
		$tagCnt++;
		$tags[] = URL( 't' )->setVar( 'ag', trim( $tag->tag_text ) )->anchorTag( $tag->tag_text );
	}
	if ( count( $tags ) )
	{
		?><div class="full-tags"><?= implode( $tags,', ' ); ?></div><?
	}
	?>
</li>
</ul>
